Task processing utilizing queues

ABSTRACT

A system includes a plurality of queues configured to hold tasks and state information associated with such tasks. The system further includes a plurality of listeners configured to query one of the plurality of queues for a task, receive, in response to querying one of the plurality of queues for a task, a task together with state information associated with the task, effect processing of the received task, and communicate a result of the received task to another queue of the plurality of queues, the another queue of the plurality of queues being selected based on the processing of the received task.

CROSS-REFERENCE TO RELATED APPLICATION

This is a continuation of U.S. patent application Ser. No. 15/722,533filed Oct. 2, 2017, which is a continuation of U.S. patent applicationSer. No. 14/942,596 filed Nov. 16, 2015, now U.S. Pat. No. 9,778,955issued Oct. 3, 2017, which is a continuation of U.S. patent applicationSer. No. 14/320,309 filed Jun. 30, 2014, now U.S. Pat. No. 9,191,299issued Nov. 17, 2015, which claims the benefit of priority to U.S.Provisional Application No. 61/943,375 filed Feb. 22, 2014 and U.S.Provisional Application No. 61/943,424 filed Feb. 23, 2014, each ofwhich are incorporated herein by reference in their entirety.

COPYRIGHT STATEMENT

All of the material in this patent document is subject to copyrightprotection under the copyright laws of the United States and othercountries. The copyright owner has no objection to the facsimilereproduction by anyone of the patent document or the patent disclosure,as it appears in official governmental records but, otherwise, all othercopyright rights whatsoever are reserved.

BACKGROUND OF THE INVENTION

The present invention generally relates to task processing.

Traditionally, single-threaded systems are limited by how fast each itemcan be processed. Further, in processing workflows, with some systems,an error later in the workflow can leave the system in an inconsistentstate, or can cause loss of data.

Additionally, scaling traditional systems can be difficult. Physicalservers must be shut down to add resources. Virtual machines can scaleup (add resources), but traditional systems wouldn't allow scaling out(adding nodes).

A need exists for improvement in task processing. This need, as well asother needs, is addressed by one or more aspects of the presentinvention.

SUMMARY OF THE INVENTION

The present invention includes many aspects and features. Moreover,while many aspects and features relate to, and are described in, thecontext of health care, the present invention is not limited to use onlyin this context, as will become apparent from the following summariesand detailed descriptions of aspects, features, and one or moreembodiments of the present invention.

Accordingly, one aspect of the present invention relates to a methodcomprising polling, by a first queue listener loaded on a first server,a first queue; receiving, at the first queue listener loaded on thefirst server in response to the polling by the first queue listener ofthe first queue, a first task and state information associated with thefirst task; executing, at the first server, the first task utilizing thestate information associated with the first task; communicating, fromthe first server to a second queue, a first result of the first task,the first result including state information; polling, by a second queuelistener loaded on a second server, the second queue; receiving, at thesecond queue listener loaded on the second server in response to thepolling by the second queue listener of the second queue, a second taskbased on the first result communicated from the first server to thesecond queue, together with state information associated with the secondtask that is based on the state information included in the firstresult; executing, at the second server, the second task utilizing thestate information associated with the second task; communicating, fromthe second server to a third queue, a second result of the second task,the result including state information; polling, by a third queuelistener loaded on a third server, the third queue; receiving, at thethird queue listener loaded on the third server in response to thepolling by the third queue listener of the third queue, a third taskbased on the second result communicated from the second server to thethird queue, together with state information associated with the thirdtask that is based on the state information included in the secondresult; executing, at the third server, the third task utilizing thestate information associated with the third task; and communicating,from the third server to a fourth queue, a third result of the thirdtask.

In a feature of this aspect, the first server comprises an electronicdevice.

In a feature of this aspect, the first server comprises one or moreelectronic devices.

In a feature of this aspect, the second server comprises an electronicdevice.

In a feature of this aspect, the second server comprises one or moreelectronic devices.

In a feature of this aspect, the third server comprises an electronicdevice.

In a feature of this aspect, the third server comprises one or moreelectronic devices.

In a feature of this aspect, the method further comprises communicatinga confirmation of completion of the first task.

In a feature of this aspect, the method further comprises displaying, ata display associated with an electronic device, information to a userbased on the third result.

In a feature of this aspect, the method further comprises displaying, ata display associated with an electronic device, a notification to a userbased on the third result.

In a feature of this aspect, the method further comprises displaying, ata display associated with an electronic device, a notificationassociated with a patient health care order to a user based on the thirdresult.

In a feature of this aspect, the method further comprises displaying, ata display associated with an electronic device, a notification of a ruleviolation of a patient health care order to a user based on the thirdresult.

In a feature of this aspect, the method further comprises displaying, ata display associated with an electronic device, a notificationassociated with a patient health care order to a user.

In a feature of this aspect, the method further comprises displaying, ata display associated with an electronic device, a notification of a ruleviolation of a patient health care order to a user.

In a feature of this aspect, executing, at the third server, the thirdtask utilizing the state information associated with the third taskcomprises determining whether a rule of a health care order has beenviolated.

In a feature of this aspect, executing, at the third server, the thirdtask utilizing the state information associated with the third taskcomprises effecting communication of a notification.

In a feature of this aspect, executing, at the third server, the thirdtask utilizing the state information associated with the third taskcomprises effecting communication of a notification that a rule of ahealth care order has been violated.

In a feature of this aspect, executing, at the third server, the thirdtask utilizing the state information associated with the third taskcomprises effecting communication of a notification that a patient isnon-compliant with a health care order.

Another aspect relates to a method which includes polling, by a firstqueue listener loaded on a first server, a first queue; receiving, atthe first queue listener loaded on the first server in response to thepolling by the first queue listener of the first queue, a first task andstate information associated with the first task; executing, at thefirst server, the first task utilizing the state information associatedwith the first task; communicating, from the first server to a secondqueue, a first result of the first task, the first result includingstate information; polling, by a second queue listener loaded on asecond server, the second queue; receiving, at the second queue listenerloaded on the second server in response to the polling by the secondqueue listener of the second queue, a second task based on the firstresult communicated from the first server to the second queue, togetherwith state information associated with the second task that is based onthe state information included in the first result; executing, at thesecond server, the second task utilizing the state informationassociated with the second task; and communicating, from the secondserver, a result of the second task.

Another aspect relates to a non-transitory computer readable mediumcontaining computer executable instructions for performing a disclosedmethod.

Another aspect relates to a system which includes a plurality of queuesconfigured to hold tasks and state information associated with suchtasks. The system further includes a plurality of listeners configuredto query one of the plurality of queues for a task, receive, in responseto querying one of the plurality of queues for a task, a task togetherwith state information associated with the task, effect processing ofthe received task, and communicate a result of the received task toanother queue of the plurality of queues, the another queue of theplurality of queues being selected based on the processing of thereceived task.

In addition to the aforementioned aspects and features of the presentinvention, it should be noted that the present invention furtherencompasses the various possible combinations and subcombinations ofsuch aspects and features. Thus, for example, any aspect may be combinedwith an aforementioned feature in accordance with the present inventionwithout requiring any other aspect or feature.

BRIEF DESCRIPTION OF THE DRAWINGS

One or more preferred embodiments of the present invention now will bedescribed in detail with reference to the accompanying drawings, whereinthe same elements are referred to with the same reference numerals, andwherein,

FIG. 1 illustrates an exemplary process which includes four steps;

FIGS. 2-6 illustrate the use of listeners to handle tasks from queues;

FIG. 7 illustrates the use of a failure repository;

FIG. 8 illustrates the storage of state data with tasks in a persistentqueue;

FIGS. 9-13 illustrate use of several listeners to process tasks of apersistent queue;

FIG. 14 illustrates use of four queues where processing of tasksreceived at each queue may result in various possible results;

FIG. 15 illustrates the presence of various tasks at various queues at apoint in time; and

FIG. 16 illustrates an exemplary methodology for analyzing a health careorder specified by a health care provider.

DETAILED DESCRIPTION

As a preliminary matter, it will readily be understood by one havingordinary skill in the relevant art (“Ordinary Artisan”) that the presentinvention has broad utility and application. As should be understood,any embodiment may incorporate only one or a plurality of theabove-disclosed aspects of the invention and may further incorporateonly one or a plurality of the above-disclosed features. Furthermore,any embodiment discussed and identified as being “preferred” isconsidered to be part of a best mode contemplated for carrying out thepresent invention. Other embodiments also may be discussed foradditional illustrative purposes in providing a full and enablingdisclosure of the present invention. As should be understood, anyembodiment may incorporate only one or a plurality of theabove-disclosed aspects of the invention and may further incorporateonly one or a plurality of the above-disclosed features. Moreover, manyembodiments, such as adaptations, variations, modifications, andequivalent arrangements, will be implicitly disclosed by the embodimentsdescribed herein and fall within the scope of the present invention.

Accordingly, while the present invention is described herein in detailin relation to one or more embodiments, it is to be understood that thisdisclosure is illustrative and exemplary of the present invention, andis made merely for the purposes of providing a full and enablingdisclosure of the present invention. The detailed disclosure herein ofone or more embodiments is not intended, nor is to be construed, tolimit the scope of patent protection afforded the present invention,which scope is to be defined by the claims and the equivalents thereof.It is not intended that the scope of patent protection afforded thepresent invention be defined by reading into any claim a limitationfound herein that does not explicitly appear in the claim itself.

Thus, for example, any sequence(s) and/or temporal order of steps ofvarious processes or methods that are described herein are illustrativeand not restrictive. Accordingly, it should be understood that, althoughsteps of various processes or methods may be shown and described asbeing in a sequence or temporal order, the steps of any such processesor methods are not limited to being carried out in any particularsequence or order, absent an indication otherwise. Indeed, the steps insuch processes or methods generally may be carried out in variousdifferent sequences and orders while still falling within the scope ofthe present invention. Accordingly, it is intended that the scope ofpatent protection afforded the present invention is to be defined by theappended claims rather than the description set forth herein.

Additionally, it is important to note that each term used herein refersto that which the Ordinary Artisan would understand such term to meanbased on the contextual use of such term herein. To the extent that themeaning of a term used herein—as understood by the Ordinary Artisanbased on the contextual use of such term—differs in any way from anyparticular dictionary definition of such term, it is intended that themeaning of the term as understood by the Ordinary Artisan shouldprevail.

Regarding applicability of 35 U.S.C. § 112, ¶6, no claim element isintended to be read in accordance with this statutory provision unlessthe explicit phrase “means for” or “step for” is actually used in suchclaim element, whereupon this statutory provision is intended to applyin the interpretation of such claim element.

Furthermore, it is important to note that, as used herein, “a” and “an”each generally denotes “at least one,” but does not exclude a pluralityunless the contextual use dictates otherwise. Thus, reference to “apicnic basket having an apple” describes “a picnic basket having atleast one apple” as well as “a picnic basket having apples.” Incontrast, reference to “a picnic basket having a single apple” describes“a picnic basket having only one apple.”

When used herein to join a list of items, “or” denotes “at least one ofthe items,” but does not exclude a plurality of items of the list. Thus,reference to “a picnic basket having cheese or crackers” describes “apicnic basket having cheese without crackers”, “a picnic basket havingcrackers without cheese”, and “a picnic basket having both cheese andcrackers.” Finally, when used herein to join a list of items, “and”denotes “all of the items of the list.” Thus, reference to “a picnicbasket having cheese and crackers” describes “a picnic basket havingcheese, wherein the picnic basket further has crackers,” as well asdescribes “a picnic basket having crackers, wherein the picnic basketfurther has cheese.”

Referring now to the drawings, one or more preferred embodiments of thepresent invention are next described. The following description of oneor more preferred embodiments is merely exemplary in nature and is in noway intended to limit the invention, its implementations, or uses.

In one or more preferred implementations, a system utilizes queues,queue listeners, and tasks to implement a methodology. In one or morepreferred implementations, such a methodology can be characterized asutilizing dependency inversion.

In an exemplary methodology, for each step of a workflow, there is aqueue listener. This listener periodically polls an incoming queue fortasks. When a task is found, the item is generally marked as inprogress, the task is executed, a resulting task is placed in anoutgoing queue, and finally the task is removed from the incoming queue.The next step of the workflow treats the previous outgoing queue as itsincoming queue, and the process continues. If an error occurs, the taskwill, after a timeout, be re-pulled to try again. If a task fails acertain number of times, the task is preferably added to a failurerepository (e.g. to be examined by a support team). In one or morepreferred implementations, because the tasks are stored in persistentqueues and current state is stored with the task, new server instancescan be created to process items on the fly. In one or more preferredimplementations, if certain steps of the workflow require minimalresources, the queue listeners for different queues are started on thesame server (potentially at the cost of losing the ability to scalesteps individually).

For illustrative purposes, consider an exemplary process comprising foursteps, as illustrated in FIG. 1 . In an exemplary implementation, aqueue will be set up for each of these steps, as illustrated in FIG. 2 .

In one or more preferred implementations, one or more queue listenersperiodically poll a step queue for a task that needs to be performed(e.g. an instance of that step). In one or more preferredimplementations, queue listener may be configured to only poll a singlestep queue, while in one or more preferred implementations a queuelistener may be configured to poll multiple step queues.

When a task is found, the task is generally marked as in progress, thetask is executed, and a resulting task is placed into a subsequentqueue, as illustrated in FIG. 2 . This process can be repeated for eachstep.

In one or more preferred implementations, rather than execute a taskitself, listener may be configured to assign a task to a worker, asillustrated in FIG. 3 . In one or more preferred implementations, aworker may return a result to the listener who may pass it on to anotherqueue, as illustrated in FIG. 3 , or the worker itself may pass a resultto another queue, as illustrated in FIG. 4 .

In one or more preferred implementations, upon completion of a task,confirmation that the task has been completed is returned to the queuethe task came from, as illustrated in FIG. 5 . For example, in one ormore preferred implementations, a task is indicated to be in progressonce it has been sent to a listener, and is then marked completed andremoved from the queue once confirmation has been received that the taskhas been completed. In one or more preferred implementations, ifconfirmation of completion is not received for a task that has been sentto a listener without a defined time frame, then the task is consideredto have failed to be completed and is placed back in the queue forsending out to another listener.

Additionally or alternatively, in one or more preferred implementations,a listener that fails to complete a task may communicate a failuremessage back to a queue, as illustrated in FIG. 6 . The failure messagemay include an indication of the task that failed to be completed or acopy of the task itself. In one or more preferred implementations,repeated failures of a task may cause the task to be placed into afailure repository, as illustrated in FIG. 7 .

In one or more preferred implementations, tasks are stored in persistentqueues and a current state is stored with the task, as illustrated inFIG. 8 . The use of persistent queues and the storage of state dataallows listeners to pick up discrete tasks and process themindependently of other tasks, which in turn allows a system to be scaledout by adding additional listeners if needed. FIGS. 9-11 illustrate useof several listeners to process tasks of a persistent queue. Theselisteners may be running on separate servers, as illustrated in FIG. 12, or on the same server, as illustrated in FIG. 13 .

Although thus far described in the context of a linear process forillustrative purposes, it will be appreciated that methodologiesdescribed herein are applicable to more complicated processes as well.For example, FIG. 14 illustrates use of four queues for a slightly morecomplicated process where processing of tasks received at each queue mayresult in various possible results. At any given time, each of thesequeues may have various numbers of tasks ready to be sent to a listener,as illustrated in FIG. 15 . In one or more preferred implementations, ifone or more queues appear to be highly loaded, one or more additionallisteners may be brought into the system.

It will be appreciated that methodologies described herein may beutilized in implementing much more complicated processes. Forillustrative purposes, a methodology for use in a health care contextwill now be described.

Specifically, in one or more preferred implementations, methodologiesdescribed herein are utilized in a health care context to process healthcare workflows. In one or more preferred implementations, a methodologyfor processing health care workflows is implemented for a Windows Azureenvironment.

When a patient is receiving medical treatment, he or she may sometimesbe presented with a care plan which will facilitate his or hertreatment. The care plan may include instructions for one or moreactions to perform or measurements to take outside of a health careprofessional's supervision. For example, a patient may be provided acare plan which includes instructions to weigh himself or herself everyday, and record the results for eventual review by a health careprofessional.

Additionally, sometimes, a patient may be presented with a health caregoal to meet. For example, a patient may be instructed to try to meetthe goal of losing ten pounds over three months. This goal may includerelated instructions for the patient to weigh himself or herself everymorning.

In one or more preferred implementations, methodologies disclosed hereinare implemented for a monitoring and compliance application whichimproves patient engagement and collaboration between a patient and hisor her health care provider. In an exemplary methodology, orders arecreated in an EHR for patients to perform home monitoring. The patientis notified of the order and the request will appear as a goal for thepatient within a platform portal (such as, for example a web portal or amobile application). The patient may comply with the order (which mightbe, for example, to monitor his or her weight daily) utilizing wirelessdevices (such as a Withings scale) that can communicate data to otherdevices or to the platform, or by manually entering values into theplatform. This home monitoring data is then evaluated against patientspecific rules that were configured when the order was placed.Non-compliance of the order or violation of any of the order parameterswill result in a notification that is sent back to the ordering provideras a message in the EHR. The notification provides summary informationabout the order and results allowing the provider to determine if anintervention is necessary. Upon completion of the order, a summary ofthe results is sent back to the EHR for review by the provider.

FIG. 16 illustrates an exemplary methodology for analyzing a health careorder specified by a health care provider.

Systems and methodologies in accordance with one or more preferredimplementations described herein support parallel processing of items(e.g. tasks). Further, systems and methodologies in accordance with oneor more preferred implementations described herein support both scalingup and scaling out. For example, in accordance with one or morepreferred implementations, resources can be added to existing servers,or new servers can be added. Additionally, each step of a workflow canbe individually scaled.

Based on the foregoing description, it will be readily understood bythose persons skilled in the art that the present invention issusceptible of broad utility and application. Many embodiments andadaptations of the present invention other than those specificallydescribed herein, as well as many variations, modifications, andequivalent arrangements, will be apparent from or reasonably suggestedby the present invention and the foregoing descriptions thereof, withoutdeparting from the substance or scope of the present invention.Accordingly, while the present invention has been described herein indetail in relation to one or more preferred embodiments, it is to beunderstood that this disclosure is only illustrative and exemplary ofthe present invention and is made merely for the purpose of providing afull and enabling disclosure of the invention. The foregoing disclosureis not intended to be construed to limit the present invention orotherwise exclude any such other embodiments, adaptations, variations,modifications or equivalent arrangements, the present invention beinglimited only by the claims appended hereto and the equivalents thereof.

What is claimed is:
 1. A processor-based method comprising: (a) polling,via server polling, a first queue by a first queue listener associatedwith a first server; (b) receiving a first task and state informationassociated with the first task at the first queue listener in responseto the polling by the first queue listener of the first queue; (c)executing, at the first server, the first task utilizing the stateinformation associated with the first task; (d) electronicallycommunicating a first result of the first task to a second queue, thefirst result including state information associated with the first task;(e) polling, via server polling, the second queue by a second queuelistener associated with a second server; (f) receiving, at the secondqueue listener in response to the polling by the second queue listenerof the second queue, a second task based on the first resultcommunicated from the first server to the second queue, together withstate information associated with the second task that is based on thestate information included in the first result; (g) executing, at thesecond server, the second task utilizing the state informationassociated with the second task; (h) electronically communicating asecond result of the second task to a third queue, the second resultincluding state information associated with the second task; (i)polling, via server polling, the third queue by a third queue listenerassociated with a third server; (j) receiving, at the third queuelistener in response to the polling by the third queue listener of thethird queue, a third task based on the second result communicated fromthe second server to the third queue, together with state informationassociated with the third task that is based on the state informationincluded in the second result; (k) executing, at the third server, thethird task utilizing the state information associated with the thirdtask; and (l) generating and electronically communicating a third resultof the third task.
 2. The processor-based method of claim 1, wherein thefirst server comprises an electronic device.
 3. The processor-basedmethod of claim 1, wherein the first server comprises one or moreelectronic devices.
 4. The processor-based method of claim 1, whereinthe second server comprises an electronic device.
 5. The processor-basedmethod of claim 1, wherein the second server comprises one or moreelectronic devices.
 6. The processor-based method of claim 1, whereinthe third server comprises an electronic device.
 7. The processor-basedmethod of claim 1, wherein the third server comprises one or moreelectronic devices.
 8. The processor-based method of claim 1, whereinthe method further comprises communicating a confirmation of completionof the first task.
 9. The processor-based method of claim 1, wherein themethod further comprises displaying, at a display associated with anelectronic device, information to a user based on the third result. 10.The processor-based method of claim 1, wherein the method furthercomprises displaying, at a display associated with an electronic device,a notification to a user based on the third result.
 11. Theprocessor-based method of claim 1, wherein the method further comprisesdisplaying, at a display associated with an electronic device, anotification associated with a patient health care order to a user basedon the third result.
 12. The processor-based method of claim 1, whereinthe method further comprises displaying, at a display associated with anelectronic device, a notification of a rule violation of a patienthealth care order to a user based on the third result.
 13. Theprocessor-based method of claim 1, wherein the method further comprisesdisplaying, at a display associated with an electronic device, anotification associated with a patient health care order to a user. 14.The processor-based method of claim 1, wherein the method furthercomprises displaying, at a display associated with an electronic device,a notification of a rule violation of a patient health care order to auser.
 15. The processor-based method of claim 1, wherein executing, atthe third server, the third task utilizing the state informationassociated with the third task comprises determining whether a rule of ahealth care order has been violated.
 16. The processor-based method ofclaim 1, wherein executing, at the third server, the third taskutilizing the state information associated with the third task compriseseffecting communication of a notification.
 17. The processor-basedmethod of claim 1, wherein executing, at the third server, the thirdtask utilizing the state information associated with the third taskcomprises effecting communication of a notification that a rule of ahealth care order has been violated.
 18. The processor-based method ofclaim 1, wherein executing, at the third server, the third taskutilizing the state information associated with the third task compriseseffecting communication of a notification that a patient isnon-compliant with a health care order.
 19. A processor-based methodcomprising: (a) polling, via server polling, a first queue by a firstqueue listener associated with a first server; (b) receiving a firsttask and state information associated with the first task at the firstqueue listener in response to the polling by the first queue listener ofthe first queue; (c) executing, at the first server, the first taskutilizing the state information associated with the first task; (d)electronically communicating a first result of the first task to asecond queue, the first result including state information associatedwith the first task; (e) polling, via server polling, the second queueby a second queue listener associated with a second server; (f)receiving, at the second queue listener in response to the polling bythe second queue listener of the second queue, a second task based onthe first result, together with state information associated with thesecond task that is based on the state information included in the firstresult; (g) executing, at the second server, the second task utilizingthe state information associated with the second task; (h)electronically communicating a second result of the second task.
 20. Anon-transitory computer readable medium containing computer executableinstructions for performing a method comprising: (a) polling, via serverpolling, a first queue by a first queue listener associated with a firstserver; (b) receiving a first task and state information associated withthe first task at the first queue listener in response to the polling bythe first queue listener of the first queue; (c) executing, at the firstserver, the first task utilizing the state information associated withthe first task; (d) electronically communicating a first result of thefirst task to a second queue, the first result including stateinformation associated with the first task; (e) polling, via serverpolling, the second queue by a second queue listener associated with asecond server; (f) receiving, at the second queue listener in responseto the polling by the second queue listener of the second queue, asecond task based on the first result, together with state informationassociated with the second task that is based on the state informationincluded in the first result; (g) executing, at the second server, thesecond task utilizing the state information associated with the secondtask; (h) electronically communicating a second result of the secondtask.